<template>
	<view class="about">
		<!-- <view class="about_top">
			<u-icon name="arrow-left" color="#919191" size="40" @click="$router.go(-1)"></u-icon>
			<view class="about_top_title">About Us</view>
		</view> -->
		<navbar :title="$t('wode.aboutus')" backColor="#0f0f0f" titleColor="#0f0f0f" :background="$utypeprimary"></navbar>
		<!-- 主体 -->
		<view style="text-align:center;">

		<image src="@/static/image/logo.png" style="width:160rpx;height:160rpx;border-radius:20rpx;margin:auto;margin-top:40rpx;" />
		</view>
		<view class="about_main">
			<view class="about_main_item border_bottom" @click="navTo('/pages/home/rule', {type:'user'})">
				<view class="about_main_item_title">
					{{$t('wode.user')}}
				</view>
				<view class="about_main_item_right">
					<view class="about_main_item_icon">
						<image :src="iconRight" mode="widthFix" class="img"></image>
					</view>
				</view>
			</view>
			<view class="about_main_item border_bottom" @click="navTo('/pages/home/rule', {type:'privacy'})">
				<view class="about_main_item_title">
					{{$t('wode.privacy')}}
				</view>
				<view class="about_main_item_right">
					<view class="about_main_item_icon">
						<image :src="iconRight" mode="widthFix" class="img"></image>
					</view>
				</view>
			</view>
			<view class="about_main_item" @click="checkVersion">
				<view class="about_main_item_title">
					{{$t('wode.version')}}
				</view>
				<view class="about_main_item_right">
					<text>{{version}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data () {
			return {
				version: '-',
				iconRight: '../../static/image/goods/next_grey.png',
			}
		},
		onShow() {
			this.version = uni.getStorageSync('localVersion') || '-'
		},
		methods: {
			toRich() {
				uni.navigateTo({
					url: `/pages/richtext/rule?type=1`
				})
			},
			checkVersion () {
			},
			navTo(val, data) {
				let param = '';
				if (data) {
					param = '?';
					for (let i in data) {
						param += `${i}=${data[i]}&`
					}
				}
				uni.navigateTo({
					url: val + param
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.about {
		min-height: 100vh;
		background: #fff;
		
		.img {
			width: 100%;
		}
		
		// top
		.about_top {
			padding-bottom: 20rpx;
			padding-left: 38rpx;
			margin-top: 112rpx;
			background: #fff;
			border-bottom: 1rpx solid #ececec;
			
			.about_top_title {
				display: inline-block;
				margin-left: 214rpx;
				font-size: 32rpx;
				font-weight: 700;
				font-family: Roboto, Roboto-Bold;
				color: #000000;
			}
		}
		
		// main
		.about_main {
			background: #fff;
			margin-top: 87rpx;
			margin-left: 2rpx;
			padding: 0 24rpx 0 30rpx;
			
			.border_bottom {
				border-bottom: 1rpx solid #ececec;
			}
			
			.about_main_item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 37rpx 0;
				
				.about_main_item_title {
					font-size: 32rpx;
					font-family: Roboto, Roboto-Regular;
					font-weight: 400;
					color: #444444;
					letter-spacing: 0rpx;
				}
				.about_main_item_right {
					display: flex;
					align-items: center;
					
					text {
						margin-right: 16rpx;
						opacity: 1;
						font-size: 32rpx;
						font-family: Roboto, Roboto-Regular;
						font-weight: 400;
						color: #b9b9b9;
						letter-spacing: 0rpx;
					}
					.about_main_item_icon {
						width: 13rpx;
						height: 23rpx;
					}
				}
			}
		}
	}
</style>
